#include <STC15F2K60S2.H>
#include "Latch.h"
#include "Delay.h"
#include "DS18B20.h"
#include "Onewire.h"
#include "Nixie.h"
#include "Timer2.h"

float t = 0;

void show(void)
{
		DS18B20_Convert();
		Delay(1000);
	t = DS18B20_Read();
	t *= 10;
	Nixie_show(1,(unsigned int)t / 100);
	Nixie_show(2,(unsigned int)t / 10 % 10 + 10);
	Nixie_show(3,(unsigned int)t % 10);
}



void main(void)
{

	Latch(0x80,0xaa);
	Latch(0xa0,0x00);
	DS18B20_Convert();
	Delay(1000);
	Timer2Init();
	while(1)
	{
show();
	}
}

void Timer2()interrupt 12 using 1
{
	T2L = 0xCD;		//设置定时初值
	T2H = 0xD4;		//设置定时初值	
	N_loop();
		
}
